package com.ruoyi.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;

/**
 * 优惠券管理对象 coupon
 * 
 * @author jsj
 * @date 2024-03-27
 */
public class Coupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 类型 */
    @Excel(name = "类型")
    private String type;

    /** 折扣 */
    @Excel(name = "折扣")
    private Long discount;

    /** 触发金额 */
    @Excel(name = "触发金额")
    private Long triggerMoney;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private Long preferentialMoney;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime start;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime end;

    /** 投放数量 */
    @Excel(name = "投放数量")
    private Long num;

    /** 领取数量 */
    @Excel(name = "领取数量")
    private Long size;

    /** 使用开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime expirationStart;

    /** 使用结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime expirationEnd;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 删除状态 */
    private Long deleted;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setDiscount(Long discount) 
    {
        this.discount = discount;
    }

    public Long getDiscount() 
    {
        return discount;
    }
    public void setTriggerMoney(Long triggerMoney) 
    {
        this.triggerMoney = triggerMoney;
    }

    public Long getTriggerMoney() 
    {
        return triggerMoney;
    }
    public void setPreferentialMoney(Long preferentialMoney) 
    {
        this.preferentialMoney = preferentialMoney;
    }

    public Long getPreferentialMoney() 
    {
        return preferentialMoney;
    }
    public void setStart(LocalDateTime start)
    {
        this.start = start;
    }

    public LocalDateTime getStart()
    {
        return start;
    }
    public void setEnd(LocalDateTime end)
    {
        this.end = end;
    }

    public LocalDateTime getEnd()
    {
        return end;
    }
    public void setNum(Long num) 
    {
        this.num = num;
    }

    public Long getNum() 
    {
        return num;
    }
    public void setSize(Long size) 
    {
        this.size = size;
    }

    public Long getSize() 
    {
        return size;
    }
    public void setExpirationStart(LocalDateTime expirationStart)
    {
        this.expirationStart = expirationStart;
    }

    public LocalDateTime getExpirationStart()
    {
        return expirationStart;
    }
    public void setExpirationEnd(LocalDateTime expirationEnd)
    {
        this.expirationEnd = expirationEnd;
    }

    public LocalDateTime getExpirationEnd()
    {
        return expirationEnd;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setDeleted(Long deleted) 
    {
        this.deleted = deleted;
    }

    public Long getDeleted() 
    {
        return deleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("type", getType())
            .append("discount", getDiscount())
            .append("triggerMoney", getTriggerMoney())
            .append("preferentialMoney", getPreferentialMoney())
            .append("start", getStart())
            .append("end", getEnd())
            .append("num", getNum())
            .append("size", getSize())
            .append("expirationStart", getExpirationStart())
            .append("expirationEnd", getExpirationEnd())
            .append("status", getStatus())
            .append("deleted", getDeleted())
            .toString();
    }
}
